package org.clockworkmages.games.anno1186;

import javax.swing.JList;
import javax.swing.JTextField;

import org.clockworkmages.games.anno1186.gui.LocalExplorationPanel;
import org.clockworkmages.games.anno1186.gui.GamePanel;
import org.clockworkmages.games.anno1186.gui.InfoTextPane;
import org.clockworkmages.games.anno1186.gui.LocalMapPanel;
import org.clockworkmages.games.anno1186.gui.MainTextPanel;
import org.clockworkmages.games.anno1186.gui.OptionTextInputKeyListener;
import org.clockworkmages.games.anno1186.model.option.Option;

public class GameGuiService {

	// private AnimatedTextPane textPane;
	//
	// private InfoTextPane statsPane;
	//
	// private JList<Option> optionList;
	//
	// private JTextField optionTextInput;
	//
	// private OptionTextInputKeyListener optionTextInputKeyListener;
	//
	// private JPanel optionCardPanel;

	private GamePanel gamePanel;

	public void setGamePanel(GamePanel gamePanel) {
		this.gamePanel = gamePanel;
	}

	public MainTextPanel getTextPane() {
		return gamePanel.getExplorationPanel().getTextPane();
	}

	public InfoTextPane getBottomLeft() {
		return gamePanel.getExplorationPanel().getBottomLeftPanel();
	}

	public JList<Option> getOptionList() {
		return gamePanel.getExplorationPanel().getOptionList();
	}

	public JTextField getOptionTextInput() {
		return gamePanel.getExplorationPanel().getOptionTextInput();
	}

	public OptionTextInputKeyListener getOptionTextInputKeyListener() {
		return gamePanel.getExplorationPanel().getOptionTextInputKeyListener();
	}

	// public JPanel getOptionCardPanel() {
	// return gamePanel.getOptionCardPanel();
	// }

	public GamePanel getGamePanel() {
		return gamePanel;
	}

	public LocalExplorationPanel getExplorationPanel() {
		return gamePanel.getExplorationPanel();
	}

	public void addInfo(String info) {
		this.getTextPane().addInfoToBuffer(info + "\n");
	}

	public void addText(String text) {
		this.getTextPane().appendText(text);
	}

	public LocalMapPanel getLocalMapPanel() {
		return gamePanel.getExplorationPanel().getLocalMapPanel();
	}

}
